<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>心跳</title>
    <style>
        @keyframes jump {

            0%,
            100% {
                top: -10px
            }

            33% {
                top: -300px;
                transform: scale(1.5);
                opacity: 0.8;
            }

            66% {
                transform: scale(0.8);
                opacity: 0.5;
            }

        }

        @keyframes mybase {

            0%,
            100% {
                opacity: 1;
            }

            33% {
                opacity: 0.3;
            }

            66% {
                opacity: 0;
            }

        }

        body {
            height: 100vh;
            background: skyblue;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            position: relative;

        }

        .wrap {
            position: relative;
        }

        .box {
            width: 250px;
            height: 250px;
            box-sizing: border-box;
            animation: jump 4s ease infinite;
            position: relative;
            margin-bottom: 50px;
        }

        .box::before {
            content: '';
            display: block;
            position: absolute;
            width: 120px;
            height: 200px;
            background: red;
            transform: translate(88px, 13px) rotate(45deg);
            border-top-left-radius: 80px;
            border-top-right-radius: 80px;
        }

        .box::after {
            content: '';
            display: block;
            position: absolute;
            width: 120px;
            height: 200px;
            background: red;
            transform: translate(30px, 13px) rotate(-45deg);
            border-top-left-radius: 80px;
            border-top-right-radius: 80px;
        }

        .base {
            position: absolute;
            z-index: 3;
            background: transparent;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            box-shadow: 5px 5px 60px gray;
            top: 130px;
            left: 20px;
            transform: rotateX(87deg);
            animation: mybase 4s ease infinite;

        }
    </style>
</head>

<body>
    <div class="wrap">
        <div class="box"></div>
        <div class="base"></div>
    </div>


</body>

</html>